home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / AMOSList / AMOSLIST.0997 / 000290_amos-request@svcs1.digex.net_Thu Sep 25 08:26:41 1997.msg < prev    next >
Text File  |  1997-10-01  |  4KB  |  104 lines

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id IAA13776
  3.     for <mcox@access.digex.net>; Thu, 25 Sep 1997 08:26:39 -0400 (EDT)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id EAA28990
  6.     for amos-out; Thu, 25 Sep 1997 04:32:13 -0400 (EDT)
  7. Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id EAA28987
  9.     for <amos-list@svcs1.digex.net>; Thu, 25 Sep 1997 04:32:12 -0400 (EDT)
  10. Received: from punt-1.mail.demon.net (punt-1a.mail.demon.net [194.217.242.134])
  11.     by mail2.access.digex.net (8.8.5/8.8.5) with SMTP id EAA14163
  12.     for <amos-list@access.digex.net>; Thu, 25 Sep 1997 04:32:11 -0400 (EDT)
  13. Received: from agasinc.demon.co.uk ([193.237.4.98]) by punt-1.mail.demon.net
  14.            id aa1027352; 25 Sep 97 9:03 BST
  15. From: Andy Gibson <andy@agasinc.demon.co.uk>
  16. To: AMOS List <amos-list@access.digex.net>
  17. Date: Wed, 05 Jun 1996 17:48:25 -0000
  18. Message-ID: <yam6730.1271.3442264@post.demon.co.uk>
  19. In-Reply-To: <00017F0B.@modusmedia.com>
  20. X-Mailer: YAM 1.3.4 [020] - Amiga Mailer by Marcel Beck
  21. Organization: AGAS Productions
  22. Subject: Re: Re[2]: Re : Memory Banks??
  23. MIME-Version: 1.0
  24. Content-Type: text/plain; charset=iso-8859-1
  25. Content-Transfer-Encoding: 8bit
  26. X-MIME-Autoconverted: from quoted-printable to 8bit by svcs1.digex.net id EAA28988
  27. Status: O
  28. X-Status: 
  29.  
  30. On 24-Sep-97, Declan_Gorman@modusmedia.com wrote:
  31. >     
  32. >I understood what Scott meant about bank resizing so as an exercise I 
  33. >reserved a bank of 2K and proceeded to load a file of 55K into this 
  34. >bank.  The file did load with no problems but when I did a "List Bank" 
  35. >it displayed the bank length as the original size I reserved and not 
  36. >the size of the file I loaded.  It does seem to load the file 
  37. >correctly into the bank so I'm happy enough with that but is there a 
  38. >bug with List Bank?
  39.  
  40. Probably another Amos bug! :(
  41.  
  42. Which type of banks are you reserving? Data, Work, Chip or Fast?
  43.  
  44. The  best  way  to  reserve  a  bank  for  loading any data into is as
  45. follows: (elite should know this :)
  46.  
  47. F$="yourfilename"
  48. BNK=10
  49. Open In 1,F$
  50. L=Lof(1)
  51. Close 1
  52. Reserve As Data BNK,L
  53. Bload F$,Start(BNK)
  54.  
  55. BNK holds bank you want to reserve.
  56. Open In opend the file you want to load.
  57. Lof(1) Gets the size of file.
  58.  
  59. Reserve  As  Data  will  allow the bank to be compiled inside the Amos
  60. listing,  if  you  use Work instead, it's only a temp bank and will be
  61. erased  when  you  save  your  listing.  These type of banks cannot be
  62. compiled in your code either.
  63.  
  64. Bload simply loads the file into the bank (BNK) you specified.
  65.  
  66. The  above  is the best way to load any file into a bank and should be
  67. used instead of just guessing size of banks.
  68.  
  69. You could put it into a simple Proc to use anytime also. eg.
  70.  
  71. Procedure _FILE_TO_BANK[F$,BNK]
  72.   '
  73.   If Exist(F$)=0 : Pop Proc : End If
  74.   Open In 1,F$
  75.   L=Lof(1)
  76.   Close 1
  77.   Reserve As Data BNK,L
  78.   Bload F$,Start(BNK)
  79.   '
  80. End Proc
  81.  
  82. Call the proc like so...
  83.  
  84. Proc _FILE_TO_BANK["yourfle",10]
  85.  
  86. Easy as that ;^)
  87.  
  88. (Even ascii text files and exec files can be loaded this way :)
  89.  
  90. TTFN, Andy G.
  91.  
  92. -- 
  93.      _             _        _         _
  94.     _)\        ____)\      _)\   _____)\  #cONTACT mE fOR mORE iNFO#
  95.    /o� \      /o�____)    /o� \ /o�_____) #oN aREA51 rELEASES aLSO.#
  96.   //    \    // /  __    //    \\\ \____ 
  97.  /.  O   \  /. /___\ \  /.  O   \\____  \  *andy@agasinc.demon.co.uk*
  98. /    _    \/   Y   Y  \/    _    \ ___\\ \
  99. \ __/ \___/\_________ /\___/ \ __//______/        Team *AMOS*
  100.  Y                   Y        Y   Y      
  101. L8R                  :        ï¿½   ï¿½            #cOMING sOON'ish#
  102.  .     Andy Gibson (AGAS Productons)           *Roswell Gfx Adv*
  103.  ï¿½         -=<(aka SKiDZ/A51)>=-
  104.